<?php
require_once("mysql.inc.php");
require_once("checkLogin.inc.php");

if(isset($_GET["a"])) {
	logout();
}

function logout() {
	
	if(!isset($_SESSION)) {
		session_start();
	}
	
	/*destroy the session*/
	session_destroy();
	
	/*remove cookie*/
	setcookie("role", "logout", time()-3600, "/");
	
	setcookie("cancelUpdate", "remove", time()-3600, "/");
}
?>